/////////////////////////////////////////////////////////////////////////////
/*/	
 *	Creator:		Joshua C. Rouzer and Alexander Kahl
 *	Title:			Level.h
 *	Last Edited:	07/15/2013
 *	Summary:		
/*/
/////////////////////////////////////////////////////////////////////////////
#ifndef CLEVEL_H
#define CLEVEL_H
#include "Path.h"
#include "Team.h"
#include "Listener.h"
#include "Boss.h"

struct SField{
	int m_nFieldImgID;
	int m_nBackgroundImgID;
	int m_nWidth;
	int m_nHeight;
	int m_nBgHeight;
	int m_nFieldHeight;

	SField() {
		m_nFieldImgID = -1;
		m_nBackgroundImgID = -1;
		m_nWidth = 0;
		m_nHeight = 0;
		m_nBgHeight = 0;
		m_nFieldHeight = 0;
	}
};

class CLevel
{
	wchar_t m_szName;
	Path*	m_cPath1;
	Path*	m_cPath2;
	Path*	m_cPath3;
	CTeam*	m_cTeam1;
	CTeam*	m_cTeam2;
	SField	m_sField;
	float m_LevelP1[5];
	float m_LevelP2[5];

	CBoss* m_pBoss;

	bool IsClose( const float Pos1X, const float Pos1Y, const float Pos2X, const float Pos2Y );
	void CheckLaneWaypoints( CTeam* team );

public:
	CLevel();
	virtual ~CLevel();
	virtual void Enter();
	virtual void Exit();
	virtual void Update( float fDT );
	virtual void Render();
	
	void CheckWaypoints();

	//Mutators
	inline void SetPath1(Path* path)	{m_cPath1 = path;}
	inline void SetPath2(Path* path)	{m_cPath2 = path;}
	inline void SetPath3(Path* path)	{m_cPath3 = path;}
	inline void SetTeam1(CTeam* team)	{m_cTeam1 = team;}
	inline void SetTeam2(CTeam* team)	{m_cTeam2 = team;}
	inline void SetField(SField& field) {m_sField = field;}
	//Accessors
	inline Path* GetPath1 (){return m_cPath1;}
	inline Path* GetPath2 (){return m_cPath2;}
	inline Path* GetPath3 (){return m_cPath3;}
	inline CTeam* GetTeam1(){return m_cTeam1;}
	inline CTeam* GetTeam2(){return m_cTeam2;}
	inline SField GetField(){return m_sField;}

	bool m_bBossLevel;

	float GetLevelP1(int index) {return m_LevelP1[index];}
	float GetLevelP2(int index) {return m_LevelP2[index];}
	void IncreaseLevelP1(int index) { m_LevelP1[index] += .20f; }
	void IncreaseLevelP2(int index) { m_LevelP2[index] += .20f; }
};
#endif